<!-- @format -->
<script setup>
	// 默认导入 meipo 模块
	import { ref } from 'vue'
	import meipo from '../eventBus.js'

	const str = ref('')

	// 接收消息
	meipo.on('biubiubiu', (msg) => {
		// 收到来自牛郎的消息
		str.value = msg
		// 织女给牛郎回话：
		meipo.emit('ZhaNan', '渣男')
	})
</script>
<template>
	<div class="my-right">
		<h3>织女</h3>
		<p>收到来自牛郎的消息 = {{ str }}</p>
	</div>
</template>

<style scoped>
	.my-right {
		display: flex;
		justify-content: center;
		align-items: center;
		flex: 1;
		height: 100px;
		background: paleturquoise;
	}
</style>
